package 运行不了的代码;

import java.util.ArrayList;

public class MoviesDemo {
    public static void main(String[] args) {
        ArrayList<Movies> movies = new ArrayList<>();
        Movies movies1 = new Movies("<<肖申克救赎>>","9.8","罗导演");
        Movies movies2 = new Movies("<<毒液>>","9.8","顾导演");
        Movies movies3 = new Movies("<<霸王别姬>>","9.8","张导演");
        movies.add(movies1);
        movies.add(movies2);
        movies.add(movies3);
        for (int i = 0; i < movies.size(); i++) {
            System.out.println("电影的名字"+movies.get(i).getName());
            System.out.println("电影的评分"+movies.get(i).getScore());
            System.out.println("电影的导演"+movies.get(i).getActor());

        }
    }
}
